/*
 * @Author: 肖芬芳 1911683843@qq.com
 * @Date: 2022-10-20 16:33:10
 * @LastEditors: 肖芬芳 1911683843@qq.com
 * @LastEditTime: 2022-11-25 11:56:51
 * @FilePath: \node_study\routes\admin\system\user\add.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const { ObjectId } = require('mongodb');
const { User } = require('../../../../model/user.js');

module.exports = async (req, res) => {
    // console.log(req.fields)
    await User.updateOne({_id:ObjectId(req.fields._id)},req.fields)
    res.send({ 'code': 0, "msg": "编辑成功" });
}